<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="root"></div>

    <script src="./js/react.development.js"></script>
    <script src="./js/react-dom.development.js"></script>
    <script src="./js/babel.min.js"></script>

    <script type="text/babel">
      const root = ReactDOM.createRoot(document.querySelector("#root"));
      // jsx 中的子元素，元素的开始标签与结束标签中写的内容，就叫当前元素的子元素

      // 1. 字符串字面量作为子元素
      // <button>按钮</button>

      // 2. jsx 元素作为子元素
      // <button>
      //   <span>Hello</span>
      //   <span>World</span>
      // </button>

      // 3. javascript 表达式作为子元素
      <button>{isOk ? "" : ""}</button>;

      // 4. 函数作为子元素
      <button>{() => {}}</button>;
    </script>
  </body>
</html>
